// ActionScript file


package gallery.asset {
	
	import nrb.utils.InterfaceURL;
	import mx.controls.Alert;
	
	public class PhotoService {
		
		private var service:InterfaceURL;
		private var listener:Function;
		public var gallery:Gallery;
		
		public function PhotoService(url:String, listener:Function=null) {
			this.listener = listener;
			service = new InterfaceURL();
			service.set_url(url);
			service.set_method('POST');
			service.set_listener(service_listener);
			service.process();
		}
		
		public function service_listener(obj:Object=null): void {
			gallery = new Gallery(obj.gallery);
			this.listener(gallery);
		}
		
	}
	
}